fix(web): stop question answers from resetting the editor caret - #11337
fix(web): stop question answers from resetting the editor caret#11337shivamhwp wants to merge 1 commit into
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained web bug fix that preserves answer updates while removing a stale caret repositioning side effect. It introduces no new capability, schema, configuration, or sensitive-data behavior. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
a0e60a4 to
ce4c22f
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Limit details: You’ve used all 10 included reviews currently available. 📝 WalkthroughWalkthroughThe pending custom-answer callback now accepts only the question ID and answer value. Cursor metadata, snapshot comparison, and composer focus restoration were removed. The editor retains selection-state management. ChangesComposer Selection Ownership
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to This focused change removes redundant caret handling without evidence of a regression, so it is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
ce4c22f to
7caa53a
Compare
Selecting a skill in a pending question answer can leave the picker stuck and trigger
Maximum call stack size exceeded. The answer callback reads the old editor snapshot and resets the caret before the new answer has rendered, re-entering Lexical with stale token offsets.Let the editor retain its selection when reporting an answer change. Picker replacements already schedule their own caret placement. This removes the extra snapshot read and focus reset.
Refs #7805. This fixes the reproduced recursion and caret corruption; it preserves the existing skill picker. The broader request to make question answers plain text remains open. Rebased onto main.
Native Electron verification with two synthetic pending questions: the base leaves
$brounconverted, keeps 12 picker options open, and logs a stack overflow. The fix creates the Bro chip, closes the picker, and reports no errors. Typing/backspace works; Next starts empty, Previous preserves the first answer, and removing the request restores the original draft. No final answer was submitted to a provider. Web typecheck and 36 existing editor/answer tests pass; scoped lint exactly matches 17 base warnings.Before/after images and video are captured. GitHub asset upload remains pending while its background browser connection is unavailable.
Model: GPT-6. Harness: Codex.
Rebased on main
20363c32c9bfdbf49c2716ef11d1f18483fcc01b. Scoped validation rerun after rebasing; existing native and human review limits remain.Summary by CodeRabbit